<?php 
header("content-type:text/html;charset=utf8");
$u_name = $_POST['u_name'];
$u_pwd = $_POST['u_pwd'];
// print_r($u_name);die;
$pdo = new PDO("mysql:host=127.0.0.1;dbname=07c;","root","root");
$sql = "select * from user where u_name='$u_name' and u_pwd='$u_pwd'";
$res = $pdo->query($sql)->fetch(PDO::FETCH_ASSOC);
if($res)
{
	echo "<script>alert('登陆成功');location.href='show.php';</script>";
}
else
{
	echo "<script>alert('登陆失败');location.href='login.html';</script>";
}


 ?>